package books

class BookService {

    def getRandomBook(){
        def bookList = books.Book.list()
        int randomIndex = new Random().nextInt(bookList.size())
        return bookList[randomIndex]
    }
}
